<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport"
			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.css" rel="stylesheet" />
		<script src="../js/mui.js"></script>
		<script type="text/javascript">
			mui.init()
		</script>
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">党史知识</h1>
		</header>
		<div class="mui-content">
			<ul class="mui-table-view" style="margin-top: 0;">
				<!-- <li class="mui-table-view-cell">
					<a class="mui-navigate-right">Item 1</a>
				</li>
				<li class="mui-table-view-cell">
					<a class="mui-navigate-right">Item 2</a>
				</li>
				<li class="mui-table-view-cell">
					<a class="mui-navigate-right">Item 3</a>
				</li> -->
			</ul>
		</div>
	</body>
	<script>
		// 获取详情页内容
		mui.ajax('http://192.168.0.111:3000/djknow/djknows', {
			dataType: 'json', //服务器返回json格式数据
			type: 'get', //HTTP请求类型	              
			success: function(res) {
				let data = res.data
				data.forEach(item => {
					let title = localStorage.getItem('title')
					if (title == item.name) {
						let module = `
					<li class="mui-table-view-cell btn">
						<a class="mui-navigate-right">${item.title}</a>
					</li>
					`
					$('.mui-table-view').append(module)
					}
				})
				$('.btn').on('tap',function(){
					window.location.href = 'knows.html'
				})
			},
			error: function(xhr, type, errorThrown) {
				//异常处理；
				console.log(type);
			}
		});
	</script>
</html>